<template>
	<view class="vf-status" :style="'height:'+statusHeight+'px;'+'backgroundColor:'+color+';'+(fixed ? 'position: fixed;left: 0;top:0;':'')"></view>
</template>

<script>
	export default {
		props: {
			color: {
				type: String,
				default: '#fff'
			},
			fixed: {
				type: Boolean,
				default: false
			}
		},
		data() {
			return {
				statusHeight: 20
			};
		},
		created() {
			let sysInfo = uni.getSystemInfoSync();
			this.statusHeight = sysInfo.statusBarHeight;
		},
		
	}
</script>

<style lang="scss" scoped>
.vf-status{
	width: 750rpx;
}
</style>
